package com.diwu.diwuojjudgeserve.controller.inner;

import com.diwu.diwuoj.feignclient.JudgeFeignClient;
import com.diwu.diwuojjudgeserve.judge.JudgeService;
import com.diwu.diwuojmodel.entity.QuestionSubmit;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description
 * @Author diwu
 * @Date 2024/8/8
 */
@RestController
@RequestMapping("/inner")
public class JudgeInnerController implements JudgeFeignClient {

    @Resource
    private JudgeService judgeService;

    @Override
    @PostMapping("/do")
    public QuestionSubmit doJudge(@RequestParam("questionSubmitId") long questionSubmitId ){
        return  judgeService.doJudge(questionSubmitId);
    }
}
